﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace IntegratedOnBordDebug
{
    /// <summary>
    /// 中央控制器
    /// </summary>
    [Serializable]
    public class InfoDevCenter : InfoBase
    {
        private string szName = "";
        /// <summary>
        /// 设备名称
        /// </summary>
        public string SzName
        {
            get { return szName; }
            set { szName = value; }
        }

        private string szUser = "";
        /// <summary>
        /// 用户名
        /// </summary>
        public string SzUser
        {
            get { return szUser; }
            set { szUser = value; }
        }

        private string szPassword = "";
        /// <summary>
        /// 密码
        /// </summary>
        public string SzPassword
        {
            get { return szPassword; }
            set { szPassword = value; }
        }

        private string szManufacturer = "";
        /// <summary>
        /// 生产商
        /// </summary>
        public string SzManufacturer
        {
            get { return szManufacturer; }
            set { szManufacturer = value; }
        }

        private int uDeviceType = 0;
        /// <summary>
        /// 设备类型
        /// </summary>
        public int UDeviceType
        {
            get { return uDeviceType; }
            set { uDeviceType = value; }
        }

        private int uCapability = -1;
        /// <summary>
        /// 设备能力集
        /// </summary>
        public int UCapability
        {
            get { return uCapability; }
            set { uCapability = value; }
        }

        private DateTime uProductDate = new DateTime(1970, 1, 1, 0, 0, 0);
        /// <summary>
        /// 生产日期
        /// </summary>
        public DateTime UProductDate
        {
            get { return uProductDate; }
            set { uProductDate = value; }
        }

        private string uProductSn = "";
        /// <summary>
        /// 产品序列号
        /// </summary>
        public string UProductSn
        {
            get { return uProductSn; }
            set { uProductSn = value; }
        }

        private string uSoftVersion = "";
        /// <summary>
        /// 软件版本
        /// </summary>
        public string USoftVersion
        {
            get { return uSoftVersion; }
            set { uSoftVersion = value; }
        }

        private string uHardVersion = "";
        /// <summary>
        /// 硬件版本
        /// </summary>
        public string UHardVersion
        {
            get { return uHardVersion; }
            set { uHardVersion = value; }
        }

        private string uAlgVersion = "";
        /// <summary>
        /// 算法版本
        /// </summary>
        public string UAlgVersion
        {
            get { return uAlgVersion; }
            set { uAlgVersion = value; }
        }

        private int uVideoChannelNum = 0;
        /// <summary>
        /// 车位数
        /// </summary>
        public int UVideoChannelNum
        {
            get { return uVideoChannelNum; }
            set { uVideoChannelNum = value; }
        }

        private int uAudioChannelNum = 0;
        /// <summary>
        /// 音频通道数
        /// </summary>
        public int UAudioChannelNum
        {
            get { return uAudioChannelNum; }
            set { uAudioChannelNum = value; }
        }

        private int uDecodeChannelNum = 0;
        /// <summary>
        /// 解码通道数
        /// </summary>
        public int UDecodeChannelNum
        {
            get { return uDecodeChannelNum; }
            set { uDecodeChannelNum = value; }
        }

        private int uIOChannelNum = 0;
        /// <summary>
        /// I/O报警通道数
        /// </summary>
        public int UIOChannelNum
        {
            get { return uIOChannelNum; }
            set { uIOChannelNum = value; }
        }

        private int uSerialNum = 0;
        /// <summary>
        /// 串口数
        /// </summary>
        public int USerialNum
        {
            get { return uSerialNum; }
            set { uSerialNum = value; }
        }

        private int uDhcp = (int)(Enum.Parse(typeof(InfoEnumClass.EmDhcp), InfoEnumClass.EmDhcp.ON.ToString()));
        /// <summary>
        /// DHCP开关  0-关 1-开
        /// </summary>
        public int UDhcp
        {
            get { return uDhcp; }
            set { uDhcp = value; }
        }

        private string uServerIp = "";
        /// <summary>
        /// 中心服务器IP
        /// </summary>
        public string UServerIp
        {
            get { return uServerIp; }
            set { uServerIp = value; }
        }

        private int uServerPort = 0;
        /// <summary>
        /// 中心服务器监听端口
        /// </summary>
        public int UServerPort
        {
            get { return uServerPort; }
            set { uServerPort = value; }
        }

        private string uIpv4Addr = "";
        /// <summary>
        /// Ipv4的地址
        /// </summary>
        public string UIpv4Addr
        {
            get { return uIpv4Addr; }
            set { uIpv4Addr = value; }
        }

        private string uIpv4Mask = "";
        /// <summary>
        /// Ipv4的子网掩码
        /// </summary>
        public string UIpv4Mask
        {
            get { return uIpv4Mask; }
            set { uIpv4Mask = value; }
        }

        private string uIpv4Gateway = "";
        /// <summary>
        /// Ipv4的网关地址
        /// </summary>
        public string UIpv4Gateway
        {
            get { return uIpv4Gateway; }
            set { uIpv4Gateway = value; }
        }

        private string uIpv4Dns = "";
        /// <summary>
        /// Ipv4的DNS
        /// </summary>
        public string UIpv4Dns
        {
            get { return uIpv4Dns; }
            set { uIpv4Dns = value; }
        }

        private string byMac = "";
        /// <summary>
        /// MAC地址
        /// </summary>
        public string ByMac
        {
            get { return byMac; }
            set { byMac = value; }
        }

        private string szIpv6Addr = "";
        /// <summary>
        /// Ipv6地址
        /// </summary>
        public string SzIpv6Addr
        {
            get { return szIpv6Addr; }
            set { szIpv6Addr = value; }
        }

        private string szIpv6Mask = "";
        /// <summary>
        /// Ipv6子网掩码
        /// </summary>
        public string SzIpv6Mask
        {
            get { return szIpv6Mask; }
            set { szIpv6Mask = value; }
        }

        private string szIpv6Gateway = "";
        /// <summary>
        /// Ipv6网关地址
        /// </summary>
        public string SzIpv6Gateway
        {
            get { return szIpv6Gateway; }
            set { szIpv6Gateway = value; }
        }

        private string szIpv6Dns = "";
        /// <summary>
        /// Ipv6DNS
        /// </summary>
        public string SzIpv6Dns
        {
            get { return szIpv6Dns; }
            set { szIpv6Dns = value; }
        }

        private string colAdditional = "0";
        /// <summary>
        /// 是否成功
        /// </summary>
        public string ColAdditional
        {
            get { return colAdditional; }
            set { colAdditional = value; }
        }

        private int colTimeOutCount = 0;
        /// <summary>
        /// 超时次数
        /// </summary>
        public int ColTimeOutCount
        {
            get { return colTimeOutCount; }
            set { colTimeOutCount = value; }
        }

        private int videoChannelNum = 0;

        /// <summary>
        /// 车位数
        /// </summary>
        public int VideoChannelNum
        {
            get { return videoChannelNum; }
            set { videoChannelNum = value; }
        }
        public static List<InfoDevCenter> GetDevCenList(string pJson)
        {
            List<InfoDevCenter> result = new List<InfoDevCenter>();
            //if (!string.IsNullOrEmpty(pJson))
            //    result = Newtonsoft.Json.JsonConvert.DeserializeObject<List<InfoDevCenter>>(pJson);
            return result;
        }
    }
}
